<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddDelayOrderIdIndexInDelayOrderTaskTable extends AbstractMigration
{
    public function up()
    {
        $this->table('delay_order_task')
            ->addIndex(['delay_order_id'], ['name' => 'idx_delay_order', 'type' => 'normal'])
            ->save();
    }

    public function down()
    {
        $this->table('delay_order_task')
            ->removeIndexByName('idx_delay_order')
            ->save();
    }
}
